<form action="{:sysuri()}" method="post" data-auto="true" class="layui-form layui-card" data-table-id="MenuTable">

    <div class="layui-card-body">

        <div class="layui-form-item">
            <label class="layui-form-label">{:lang('还款计划ID')}</label>
            <div class="layui-input-block">
                <input disabled value='{$plan.plan_id|default=""}' class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">{:lang('期数')}</label>
            <div class="layui-input-block">
                <input disabled value='第{$plan.plan_index|default=""}期' class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">{:lang('应收金额')}</label>
            <div class="layui-input-block">
                <input disabled value='{$plan.plan_amount|default=""}' class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">{:lang('违约金')}</label>
            <div class="layui-input-block">
                <input disabled value='{$plan.overdue_fine|default=""}' class="layui-input">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">{:lang('账单类型')}</label>
            <div class="layui-input-block">
                <select name='bill_type' lay-search class="layui-select">
                    <option value="1">租中</option>
                    <option value="2">买断</option>
                </select>
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">{:lang('还款类型')}</label>
            <div class="layui-input-block">
                <select name='repay_type' lay-search class="layui-select">
                    <option value=''>-- {:lang('全部')} --</option>
                    <option value="1">提前还款</option>
                    <option value="2">逾期还款</option>
                </select>
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">{:lang('支付方式')}</label>
            <div class="layui-input-block">
                <select name='pay_method' lay-search class="layui-select">
                    <option value="0">线下转账</option>
                    <option value="1">代扣</option>
                </select>
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">{:lang('平台减免')}</label>
            <div class="layui-input-block">
                <input name="deduction_amount" placeholder="请输入平台减免" value="" class="layui-input">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">{:lang('还款金额')}</label>
            <div class="layui-input-block">
                <input name="amount" required placeholder="请输入还款金额" value="" class="layui-input">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">{:lang('还款时间')}</label>
            <div class="layui-input-block">
                <input name="pay_time" id="pay_time" required placeholder="请选择支付时间" value="" class="layui-input">
            </div>
            <script>
                layui.use('laydate', function() {
                    var laydate = layui.laydate;

                    //常规用法
                    laydate.render({
                        elem: '#pay_time',
                        type: 'datetime'
                    });
                })
            </script>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">{:lang('还款凭证')}</label>
            <div class="layui-input-block">
                <input type="hidden" data-cut-width="500" data-cut-height="500" data-max-width="500" data-max-height="500" name="repay_voucher" value="">
                <script>$('[name=repay_voucher]').uploadOneImage();</script>
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">{:lang('备注')}</label>
            <div class="layui-input-block">
                <input name="repay_remark" placeholder="请输入备注" value="" class="layui-input">
            </div>
        </div>

    </div>

    <div class="hr-line-dashed"></div>
    {notempty name='plan.id'}<input type='hidden' value='{$plan.id}' name='id'>{/notempty}

    <div class="layui-form-item text-center">
        <button class="layui-btn" type='submit'>{:lang('保存数据')}</button>
        <button class="layui-btn layui-btn-danger" type='button' data-confirm="{:lang('确定要取消编辑吗？')}" data-close>{:lang('取消编辑')}</button>
    </div>
</form>